package com.company.作业;
import com.sun.security.jgss.GSSUtil;

import java.util.Scanner;
    public class Main {
        public static void main(String[] args) {
            Scanner in=new Scanner(System.in);
            int sum=0;
            for(int i=1;i<=5;i++){
                System.out.println("第"+i+"的成绩是:");
                int grade=in.nextInt();
                sum=sum+grade;
                if((grade<0)||(grade>100)){
                    System.out.println("该成绩有误，不列入计算");
                    sum=sum-grade;
                }
                else if((grade>=0)&&(grade<=100)){
                    System.out.println("输入正确");
                }
            }
            System.out.println("sum="+sum);

        }








}







